package com.mall.service.order;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.mall.client.order.MinsuOrderService;
import com.mall.custom.dao.read.MinsuOrderReadMapper;
import com.mall.custom.dao.write.MinsuOrderWriteMapper;
import com.mall.pojo.MinsuOrder;
import com.mall.pojo.MinsuOrderExample;
@Service
public class MinsuOrderServiceImpl implements MinsuOrderService {
	
	@Autowired
	private MinsuOrderReadMapper minsuOrderReadMapper;
	@Autowired
	private MinsuOrderWriteMapper  minsuOrderWriteMapper;

	@Override
	public MinsuOrder getMinsuOrderById(Long parentId) {
		return this.minsuOrderReadMapper.selectByPrimaryKey(parentId);
	}

	@Override
	public List<MinsuOrder> getMinsuOrderListByExample(MinsuOrderExample example) {
		
		return this.minsuOrderReadMapper.selectByExample(example);
	}

	@Override
	public void modifyMinsuOrderByPrimaryKey(MinsuOrder minsuOrder) {
		minsuOrderWriteMapper.updateByPrimaryKey(minsuOrder);
		
	}

	@Override
	public void insertMinsuOrder(MinsuOrder minsuOrder) {
		minsuOrderWriteMapper.insert(minsuOrder);
		
	}

}
